#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time       :   11:49
# Author     : Y4
# Site       : 
# File       : client_cities_model.py
from App.models import BaseModel
from App.plugins import models


class Mark(BaseModel):
    __bind_key__ = 'yjh_users'  # 绑定数据库
    letter = models.Column(models.String(1), unique=True)  # 字母标记


class Cities(BaseModel):
    __bind_key__ = 'yjh_users'  # 绑定数据库
    parent_id = models.Column(models.Integer, default=0)
    region_name = models.Column(models.String(16))
    city_code = models.Column(models.Integer, default=0)
    pin_yin = models.Column(models.String(64))
    mark_id = models.Column(models.Integer, models.ForeignKey(Mark.id))